GXGetShapeDeviceArea
You can use theGXGetShapeDeviceArea
function to calculate the area of a shape on a given view device.
long GXGetShapeDeviceArea(gxShape source, gxViewPort port, gxViewDevice device);
- source
- A reference to the shape whose area on the device you want to determine.
port
- A reference to a view port that the shape is drawn to.
device
- A reference to the view device for which you wish to calculate the area.
- function result
- The number of pixels that represent the shape on the device.
DESCRIPTION
TheGXGetShapeDeviceArea
function returns the number of pixels covered by the source shape in the view port on the specified view device. The shape object cannot be a bitmap or picture shape. The view port must be in the view port list of the shape's transform object.This function accounts for just the pixels that would actually be affected if the shape were drawn. Spaces inside of framed or filled geometric shapes, or spaces within and between glyphs of typographic shapes, do not contribute to the calculated area.
ERRORS, WARNINGS, AND NOTICES
Errors out_of_memory shape_is_nil invalid_viewPort_reference invalid_viewDevice_reference illegal_type_for_shape (debugging version) SEE ALSO
To determine the bounding rectangle of a shape on a device, use theGXGetShapeDeviceBounds
function, described in the previous section.To determine the area of a shape in geometry-space coordinates, use the
GXGetShapeArea
function, described in the geometric operations chapter of
Inside Macintosh: QuickDraw GX Graphics.